package org.csmzxy.calss2333;

public class Example18 {
    public static void main(String[] args){
        String name = "小明";
        new Swim(){
            @Override
            public void swimming() {
                System.out.println(name + "学会了游泳......");
            }
        }.swimming();
        new Swim() {
            public void swimming() {
                System.out.println(name + "学会了蛙泳......");
            }
        }.swimming();
    }
}
